﻿
@{
    Layout = null;
}
@model Web.Models.TAModularModel

<table class="jm_alert_tab1" width="100%">
    <tbody>
        <tr>
            <td width="10%" align="right">环节：</td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_bumen @(Model.ModularTypeId==1?"jm_but_btn_cur":"")" data-id="1" value="产品线" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_bumen @(Model.ModularTypeId==2?"jm_but_btn_cur":"")" data-id="2" value="系统" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_bumen @(Model.ModularTypeId==3?"jm_but_btn_cur":"")" data-id="3" value="模块" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_bumen @(Model.ModularTypeId==4?"jm_but_btn_cur":"")" data-id="4" value="科目" />
            </td>
            @*<td width="16%">
                    <input type="button" class="jm_butt_btn btn_bumen" data-id="5" value="应用" />
                </td>*@
        </tr>
        <tr>
            <td width="10%" align="right">产品选择：</td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==1?"jm_but_btn_cur":"")" data-id="1" value="商务" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==2?"jm_but_btn_cur":"")" data-id="2" value="主案" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==3?"jm_but_btn_cur":"")" data-id="3" value="工程" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==4?"jm_but_btn_cur":"")" data-id="4" value="材料" />
            </td>
        </tr>
        <tr>
            <td width="10%" align="right"></td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==5?"jm_but_btn_cur":"")" data-id="5" value="造价" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==6?"jm_but_btn_cur":"")" data-id="6" value="财务" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==7?"jm_but_btn_cur":"")" data-id="7" value="人事" />
            </td>
            <td width="16%">
                <input type="button" class="jm_butt_btn btn_chanpin @(Model.ProductId==8?"jm_but_btn_cur":"")" data-id="8" value="家具弱电智能硬件" />
            </td>
        </tr>
        @if (Model.ModularTypeId >= 1)
        {
            <tr id="traddType">
                <td align="right">系统列表：</td>
                <td>
                    <span class="relative wrapper-span" data-id="1">
                        <select class="input-write jm_butt_select" id="modelList" @(Model.ModularTypeId == 2 ? "" : "disabled:disabled")>
                            <option>请选择</option>
                            <option value="0">销售</option>
                            <option value="0">生产</option>
                            <option value="0">产品</option>
                            <option value="0">地区系统</option>
                        </select>
                    </span>
                </td>
                @if (Model.ModularTypeId >= 3)
                {
                    <td align="right">@(Model.ModularTypeId == 3 ? "模块" : "科目")名称：</td>
                    <td colspan="2"><input type="text" id="ModularName" class="input-write" /></td>
                }
                else
                {
                    <td align="right"></td>
                    <td colspan="2"> </td>
                }
            </tr>
        }
        <tr>
            <td align="right">研发执行人：</td>
            <td>
                <div class="divshow clear">
                    <div class="labelbox fl" data-div="1">
                        <span class="relative wrapper-span" data-id="1">
                            @Html.DropDownList("dSelectOption", ViewBag.UserInfo as SelectList, new { @class = "input-write jm_butt_select" })
                        </span>
                    </div>
                </div>
            </td>
            <td align="right">UED执行人：</td>
            <td>
                <div class="divshow clear">
                    <div class="labelbox fl" data-div="1">
                        <span class="relative wrapper-span" data-id="1">
                            @Html.DropDownList("uSelectOption", ViewBag.UserInfo as SelectList, new { @class = "input-write jm_butt_select" })
                        </span>
                    </div>
                </div>
            </td>

        </tr>
        <tr>
            <td align="right">开发执行人：</td>
            <td>
                <div class="divshow clear">
                    <div class="labelbox fl" data-div="1">
                        <span class="relative wrapper-span" data-id="1">
                            @Html.DropDownList("dSelectOption", ViewBag.UserInfo as SelectList, new { @class = "input-write jm_butt_select" })

                        </span>
                    </div>
                </div>
            </td>

            <td align="right">测试执行人：</td>
            <td colspan="2">
                <div class="divshow clear">
                    <div class="labelbox fl" data-div="1">
                        <span class="relative wrapper-span" data-id="1">
                            @Html.DropDownList("tSelectOption", ViewBag.UserInfo as SelectList, new { @class = "input-write jm_butt_select" })
                        </span>
                    </div>
                </div>
            </td>

        </tr>
    </tbody>
</table>
@Html.HiddenFor(m => m.FatherId)
@Html.HiddenFor(m => m.Id)
@Html.HiddenFor(m => m.ModularTypeId)

<script type="text/javascript">

    $(function () {
        //选中 产品 和 环节
        $("td .jm_butt_btn").click(function () {


            if ($(this).hasClass("btn_chanpin")) {
                //产品
                $(this).parent().parent().parent().find(".btn_chanpin").removeClass("jm_but_btn_cur")
                $(this).addClass("jm_but_btn_cur");
            }
            else {
                $(this).parent().siblings().find(".jm_but_btn_cur").removeClass("jm_but_btn_cur")
                $(this).addClass("jm_but_btn_cur");
            }
        });

    })

</script>